package tests

import (
	"testing"

	"github.com/gogf/gf/database/gdb"
	"github.com/gogf/gf/frame/g"
)

var tokenStr string
var tx *gdb.TX

func setUpTx() {
	tx, _ = g.DB().Begin()
	s := g.Server()
	s.Start()
}

func setUpTest() {
	setUpTx()
	simpleUserLogin(&testing.T{}) // init tokenStr
}

func tearDownTest() {
	defer func() {
		tx.Rollback()
		// tx.Commit()

	}()

}
